import 'package:school_assistant/generated/json/base/json_field.dart';
import 'package:school_assistant/generated/json/goods_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class GoodsEntity {
  String? id;
  int? category;
  String? name;
  double? price;
  String? image;
  String? extra;

  GoodsEntity();

  factory GoodsEntity.fromJson(Map<String, dynamic> json) =>
      $GoodsEntityFromJson(json);

  Map<String, dynamic> toJson() => $GoodsEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
